from pageMethod.launchWebdriver import launchBrowser
from public.Base import PageMethod
from public.config import log

def sendCode(phone, tid):
    driver = launchBrowser(phone, tid)
    user = PageMethod(driver)
    # 输入手机号
    user.type("xpath", "//input[@placeholder='手机号']", phone, tid)
    # 点击发送验证码
    user.click("class", "css-uyobdj", tid)
    log.info(f"{phone}请输入验证码", tid)
    return driver